home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-11-18 | 44.7 KB | 1,375 lines | [TEXT/MPS ] |
- C.S.M.P. Digest Sun, 29 Mar 92 Volume 1 : Issue 37
-
- Today's Topics:
-
- Real-->String
- MPW Shell command line?
- Think C 4.0 -> 5.0 ?
- MABuild target folder fun (MacApp 2.0.1)
- Mac Pascal CWindowPtr question
- MacTCP and BSD sockets.
- Help with Think Pascal for a beginner?
- Help Me Write The Perfect Editor
- MPW questions
- Passing args to argc, argv[], and env[]
- MIDI source code and programming
- _Launch & Working Directories
- ListBox problems in Modal Dialog (II)
-
-
- The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
-
- These digests are available (by using FTP, account anonymous, your email
- address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
- edu. This is also the home of the comp.sys.mac.programmer Frequently Asked
- Questions list.
-
- These digests are also available via email. Just send a note saying that you
- want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
- automatically receive each new digest as it is created.
-
- The articles in these digests are taken directly from comp.sys.mac.programmer.
- They are not edited; all articles included in this digest are in their original
- posted form. The only articles that are -not- included in these digests are
- those which didn't receive any replies (except those that give information
- rather than ask a question). All replies to each article are concatenated
- onto the original article in the order in which they were received. Article
- threads are not added to the digests until the last article added to the
- thread is at least one month old (this is to ensure that the thread is dead
- before adding it to the digests).
-
- Send administrative mail to mkelly@cs.uoregon.edu.
-
- -------------------------------------------------------
-
- From: cent@u.washington.edu (Bob Cent)
- Subject: Real-->String
- Date: 26 Feb 92 01:52:46 GMT
- Organization: University of Washington
-
- Greetings,
-
- I want to convert a Pascal SINGLE type to STR255. Is there a function or
- procedure like the toolbox's NumToString (longint-->str255) for single type
- numbers? (I'm using Think Pascal and MacApp)
-
- Thanks.
-
- Bob Cent
- cent@u.washington.edu
- Seattle, Washington
-
-
-
- - -------------------------
-
- From: lstein@athena.mit.edu (Lincoln Stein)
- Subject: Real-->String
- Organization: Massachusetts Institute of Technology
- Date: Wed, 26 Feb 1992 12:26:01 GMT
-
- > Is there a way to convert real numbers to strings in Think Pascal?
-
- Check out the following code in the SANE.p interface file:
-
- PROCEDURE Num2Str(f: decform;x: Extended;VAR s: DecStr);
- { s <-- x according to format f }
-
- FUNCTION Str2Num(s: DecStr): Extended;
- { Str2Num <-- s }
-
- I think that these routines will do the trick.
-
- ===========================================================================
- Lincoln D. Stein Brigham & Women's Hospital
- lstein@hstbme.mit.edu Boston, MA
- ===========================================================================
-
-
-
-
- - -------------------------
-
- From: Hyperion@Altyr4.gsfc.nasa.gov (Paul D. Haggerty)
- Subject: Real-->String
- Date: 26 Feb 92 14:21:29 GMT
- Organization: Science Systems and Applications, Inc.
-
- In article <1992Feb26.015246.17828@u.washington.edu>, cent@u.washington.edu (Bob Cent) writes:
- >
- > Greetings,
- >
- > I want to convert a Pascal SINGLE type to STR255. Is there a function or
- > procedure like the toolbox's NumToString (longint-->str255) for single type
- > numbers? (I'm using Think Pascal and MacApp)
- >
- > Thanks.
- >
- > Bob Cent
- > cent@u.washington.edu
- > Seattle, Washington
- >
-
- Here's a conversion routines I use for translating between real's and strings.
-
- Hope it helps.
-
- Paul Haggerty
-
- ** Note: Personal responses should go to Haggerty@Suzieq.dnet.nasa.gov
- DO NOT reply to the originating address above. My Internet
- mailserver eats most of the mail it gets.
-
-
- ==============================================================================
-
- {**}
- {*}
- {* Convert from an extended variable to a str255 string variable using *}
- {* SANE's DecStr format. Note: Function Currently Truncates the value *}
- {* to 6 decimal places, and removes trailing 0's. *}
- {*}
- {**}
-
- function ExtendedToString (TheValue: extended): str255;
- var
- ConversionString: DecStr;
- ConversionForm: decForm;
- Index: Integer;
- begin
- ConversionForm.style := fixedDecimal;
- {Number of digits after the decimal}
- ConversionForm.digits := 6;
- num2Str(ConversionForm, TheValue, ConversionString);
- {Find last non-zero digit}
- Index := Length(ConversionString);
- while (Copy(ConversionString, Index, 1) = '0') do
- index := index - 1;
- {Make sure you haven't backed up onto the decimal point}
- if Copy(ConversionString, Index, 1) = '.' then
- index := index + 1;
- {Extract pertinent part of string}
- ConversionString := Copy(ConversionString, 1, Index);
- ExtendedToString := ConversionString;
- end;
-
-
-
- - -------------------------
-
- From: ralph@madras.mso.anu.edu.au (Ralph Sutherland)
- Subject: Real-->String
- Organization: Mt. Stromlo and Siding Spring Observatories
- Date: Wed, 26 Feb 92 14:36:19 GMT
-
- Here are a couple of trivial wrappers I use for the
- SANE conversion routines that make the conversions a little nicer
- to use:
-
- function FixStrof (x: extended; decimals: integer): str255;
- var
- f: DecForm;
- s: DecStr;
- begin
-
- f.style := FixedDecimal;
- f.digits := decimals;
- Num2Str(f, x, s);
-
- FixStrof := s;
-
- end;
-
- function FloatStrof (x: extended; decimals: integer): str255;
- var
- f: DecForm;
- s: DecStr;
- begin
-
- f.style := FloatDecimal;
- f.digits := decimals;
- Num2Str(f, x, s);
-
- FloatStrof := s;
-
- end;
-
- In THINK Pascal there is a StringOf function that allows you to
- use standard Pascal write formatting with the output to a string
- instead of a file. When I moved to MPW I wrote these to replace
- StringOf, hence the similar names....
-
- cheers
- ralph
-
-
-
- --
- - -- Ralph S. Sutherland Mount Stromlo & Siding Spring Observatories.
- - -- ralph@madras.anu.edu.au The Australian National University.
- - -- rss100@cscgpo.anu.edu.au --------------------------------------------
-
-
-
- ---------------------------
-
- From: tagreen@bronze.ucs.indiana.edu (Todd Green)
- Subject: MPW Shell command line?
- Organization: Indiana University
- Date: Wed, 26 Feb 92 14:48:10 GMT
-
- Hello,
-
- I've recently been given the task to evaluate Obj-C running in the MPW
- environment. Being a THINK C programmer, I'm in the process of
- learning to use the MPW as well. (fun, fun). Anyway I was wondering
- if anyone has written a tool for MPW, that would provide a command
- line, history, etc. that would run on top of the worksheet. Sort of
- emulate csh, or tcsh.
-
- Thanks,
- Todd
-
-
- --
- Internet: tagreen@bronze.ucs.indiana.edu
- NeXTMail: tagreen@marmoset.ucs.indiana.edu
- Bitnet: tagreen@iubacs.bitnet
-
-
-
- - -------------------------
-
- From: Bruce.Hoult@bbs.actrix.gen.nz
- Subject: MPW Shell command line?
- Date: 27 Feb 92 16:09:27 GMT
- Organization: Actrix Information Exchange
-
- In article <1992Feb26.144810.10504@bronze.ucs.indiana.edu> tagreen@bronze.ucs.indiana.edu (Todd Green) writes:
- > Anyway I was wondering
- > if anyone has written a tool for MPW, that would provide a command
- > line, history, etc. that would run on top of the worksheet. Sort of
- > emulate csh, or tcsh.
-
- Why would anyone want a Un*x style history feature when they can *already*
- see every recent command they executed, and click in that line to execute
- it again?
-
-
- --
- Bruce.Hoult@bbs.actrix.gen.nz Twisted pair: +64 4 477 2116
- BIX: brucehoult Last Resort: PO Box 4145 Wellington, NZ
- "Cray's producing a 200 MIPS personal computer with 64MB RAM and a 1 GB
- hard disk that fits in your pocket!" "Great! Is it PC compatable?"
-
-
-
- - -------------------------
-
- From: tagreen@bronze.ucs.indiana.edu (Todd Green)
- Subject: MPW Shell command line?
- Organization: Indiana University
- Date: Thu, 27 Feb 92 16:25:03 GMT
-
- In article <1992Feb27.160927.3051@actrix.gen.nz> Bruce.Hoult@bbs.actrix.gen.nz writes:
-
- >Why would anyone want a Un*x style history feature when they can *already*
- >see every recent command they executed, and click in that line to execute
- >it again?
- >
-
- a) I don't like reaching for the mouse unless I have to.
- b) I don't like scrolling up through 10 pages of output to find the
- one command that I want to execute again. (Which is faster: typing
- "!<partial command>", or reaching for the mouse, scrolling up X pages
- cliking on the line you want to execute, and then pressing
- cmd-enter? (Or using a searching function to find the function that
- you want to execute)
- c) If I have a bunch of commands that I want to execute, I'll put them
- in a shell script and call it from the command line. Which again
- is much faster than reaching for your mouse hiliting a selection and
- then selecting enter. (Yes, I know that MPW also has scripts)
-
- I just find that I'm much more productive using a standard Unix type
- shell than I am using the MPW shell.
-
- On a side note, how exactly does one read from Dev:StdIn (key strokes,
- not a selection) and directly assign the read key strokes to a shell
- variable?
-
- Thanks again,
- Todd
-
-
- --
- Internet: tagreen@bronze.ucs.indiana.edu
- NeXTMail: tagreen@marmoset.ucs.indiana.edu
- Bitnet: tagreen@iubacs.bitnet
-
-
-
- ---------------------------
-
- From: johnl@copper.ucs.indiana.edu (John Lacey)
- Subject: Think C 4.0 -> 5.0 ?
- Date: 26 Feb 92 19:42:00 GMT
- Organization: Indiana University
-
- I have an application of about 5000 lines, and I was wondering how
- difficult this would be to port to the new TCL. I use quite a lot of
- the classes, and I have about 15 subclasses, mainly of CPane,
- CDirector, and CWindow.
-
- I haven't had good luck talking to Symantec in the past, but if anyone
- has had success discussing this issue with them, I would love to know
- who/where you talked to. :-)
-
- --
- John Lacey, johnl@copper.ucs.indiana.edu ---Leo Tolstoy
- "Everyone thinks of changing the world, but no one thinks of changing himself."
-
-
-
- - -------------------------
-
- From: rla20@duts.ccc.amdahl.com (Roger Allen)
- Subject: Think C 4.0 -> 5.0 ?
- Date: 26 Feb 92 23:15:59 GMT
- Organization: Amdahl Corporation, Sunnyvale CA
-
- In article <1992Feb26.194209.1586@bronze.ucs.indiana.edu> johnl@copper.ucs.indiana.edu (John Lacey) writes:
- >I have an application of about 5000 lines, and I was wondering how
- >difficult this would be to port to the new TCL. I use quite a lot of
- >the classes, and I have about 15 subclasses, mainly of CPane,
- >CDirector, and CWindow.
- >
-
- I converted my program (~2000 lines) in a few evenings. It would have
- taken about an hour to convert except for all the changes that I had
- to do for long coordinates. This is by FAR the biggest pain. Everything
- else was very straightforward.
-
- If you don't deal with drawing too much you will be ok. Although
- I can't imagine a Mac program that doesn't have a lot to do with drawing.
-
- Just one example,
-
- Roger.
-
- P.S. Turn strict prototyping on. Some of the initialization calls
- changed and this will help. I seem to recall InitApplication
- changing.
- --
- > Roger Allen | All the opinions expressed are my <
- > Amdahl Computer Development | own and are not Amdahl's. <
- > rla20@cd.amdahl.com | ------They paid me to say that------- <
-
-
-
- ---------------------------
-
- From: ednstras@kraken.itc.gu.edu.au (Michael Strasser)
- Subject: MABuild target folder fun (MacApp 2.0.1)
- Date: 27 Feb 92 01:38:25 GMT
- Organization: ITC, Griffith University, Brisbane, Australia
-
- I just noticed today with MABuild in MacApp 2.0.1 that if you specify
-
- MABuild -Names -NoDebug Rhubarb
-
- the target folder is set to "Garbage:crud:Rhubarb:.Non-Debug Files:", but
- if you specify
-
- MABuild -NoDebug -Names Rhubarb
-
- it is set to "Garbage:crud:Rhubarb:.NoDebug Names:" (names have been
- changed to protect the innocent).
-
- Has anyone else found this? Is it a feature?
- --
- Mike Strasser ednstras@kraken.itc.gu.edu.au.
- Education Division or M.Strasser@edn.gu.edu.au.
- Griffith University
- Brisbane, Australia
-
-
-
- - -------------------------
-
- From: mlanett@void.ncsa.uiuc.edu (Mark Lanett)
- Subject: MABuild target folder fun (MacApp 2.0.1)
- Date: 27 Feb 92 04:11:23 GMT
- Organization: University of Illinois at Urbana
-
- ednstras@kraken.itc.gu.edu.au (Michael Strasser) writes:
-
- >I just noticed today with MABuild in MacApp 2.0.1 that if you specify
-
- > MABuild -Names -NoDebug Rhubarb
-
- >the target folder is set to "Garbage:crud:Rhubarb:.Non-Debug Files:", but
- >if you specify
-
- > MABuild -NoDebug -Names Rhubarb
-
- >it is set to "Garbage:crud:Rhubarb:.NoDebug Names:" (names have been
- >changed to protect the innocent).
-
- It's a feature -- separate build go in separate object folders (taking up lots
- of disk space :-) ), but methinks that giving folders names starting with
- periods and containing spaces is rather stupid. Both of these cause problems
- for MPW: occaisonally doing an ls results in a wierd error about opening
- drivers (the . problem), and unless you are extremely carefull about using
- quotes in the makefile the spaces will get you sooner or later. I rename
- everything (actually I delete most of them and leave only 2 names...);
- see {MacApp}Startup.
-
- --
- Mark Lanett mlanett@uiuc.edu
- Software Tools Group, NCSA, University of Illinois at Urbana-Champaign
-
-
-
- ---------------------------
-
- From: stewartj@cae.wisc.edu (Stewart John)
- Subject: Mac Pascal CWindowPtr question
- Date: 27 Feb 92 05:43:04 GMT
- Organization: College of Engineering, Univ. of Wisconsin-Madison
-
- I'm using THINK Pascal 4.0:
-
- program biteme;
- var
- theWindow: CWindowPtr;
- behind: CWindowPtr;
- wStorage: Ptr;
- windowID: integer;
- begin
- windowID := 400;
- wStorage := nil;
- behind := CWindowPtr(WindowPtr(-1));
- theWindow := GetNewCWindow(windowID, wStorage, behind);
- end.
-
- Why the hell am I getting a "Type incompatability between an actual
- and formal parameter. Seems to me things are as they should be
- (see Inside Mac V:207).
-
- If you have help, or want to flame me for a stupid question, send
- E-mail:
-
- stewartj@cae.wisc.edu
-
- Thanks in advance
- John
-
-
-
- - -------------------------
-
- From: mxmora@unix.SRI.COM (Matt Mora)
- Subject: Mac Pascal CWindowPtr question
- Date: 28 Feb 92 00:11:00 GMT
- Organization: SRI International, Menlo Park, California
-
- In article <1992Feb26.234304.9985@doug.cae.wisc.edu> stewartj@cae.wisc.edu (Stewart John) writes:
-
- > var
- > theWindow: CWindowPtr;
- > behind: CWindowPtr;
- > wStorage: Ptr;
- > windowID: integer;
- >begin
- > windowID := 400;
- > wStorage := nil;
- > behind := CWindowPtr(WindowPtr(-1));
- > theWindow := GetNewCWindow(windowID, wStorage, behind);
-
- Try this:
-
- theWindow := GetNewCWindow(windowID, nil, WindowPtr(-1));
-
-
-
-
-
-
-
-
- Matt
-
- --
- ___________________________________________________________
- Matthew Mora | my Mac Matt_Mora@sri.com
- SRI International | my unix mxmora@unix.sri.com
- ___________________________________________________________
-
-
-
- - -------------------------
-
- From: stewartj@cae.wisc.edu (Stewart John)
- Subject: Mac Pascal CWindowPtr question
- Date: 28 Feb 92 04:14:52 GMT
- Organization: College of Engineering, Univ. of Wisconsin-Madison
-
- In article <33131@unix.SRI.COM> mxmora@unix.SRI.COM (Matt Mora) writes:
- >In article <1992Feb26.234304.9985@doug.cae.wisc.edu> writes:
- >
- >Try this:
- >
- >theWindow := GetNewCWindow(windowID, nil, WindowPtr(-1));
- >
- >Matt
-
- Doesn't work. I guess Inside Mac is wrong, and the function GetNewCWindow
- returns WindowPtr instead of CWindowPtr. Anyway, it works now...
-
- But I still can't get the damned color picture to display with DrawPicture!
- What else do you have to do???
-
- John
- stewartj@cae.wisc.edu
-
-
-
- ---------------------------
-
- From: imran@Apple.COM (Imran Sayeed)
- Subject: MacTCP and BSD sockets.
- Date: 27 Feb 92 07:13:18 GMT
- Organization: Apple Computer Inc., Cupertino, CA
-
- I am doing some MacTCP programming (actually I am thinking of implemeting
- BSD socket library on the Mac using MacTCP ) and am wondering if such
- a library has already been written. Additionally I would like to get the
- source code for NCSA Telnet (MacTCP version ) if it's available or some
- similar example application using MacTCP. If anybody has information on
- either the socket library or the NCSA Telnet please e-mail me at
- imran@apple.com or better ST601953@brownvm.brown.edu. Thanx a lot.
-
- Imran Sayeed.
-
-
-
- - -------------------------
-
- From: mlanett@void.ncsa.uiuc.edu (Mark Lanett)
- Subject: MacTCP and BSD sockets.
- Date: 27 Feb 92 17:36:27 GMT
- Organization: University of Illinois at Urbana
-
- imran@Apple.COM (Imran Sayeed) writes:
-
- >I am doing some MacTCP programming (actually I am thinking of implemeting
- >BSD socket library on the Mac using MacTCP ) and am wondering if such
- >a library has already been written. Additionally I would like to get the
- >source code for NCSA Telnet (MacTCP version ) if it's available or some
- >similar example application using MacTCP. If anybody has information on
- >either the socket library or the NCSA Telnet please e-mail me at
- >imran@apple.com or better ST601953@brownvm.brown.edu. Thanx a lot.
-
- Ahem. You *could* fetch Telnet from ftp.ncsa.uiuc.edu... Or you could fetch
- the BSD socket library that we've also written and save yourself quite
- a bit of time. It should be in the unsupported directory (*not* the Mac
- directory).
- --
- Mark Lanett mlanett@uiuc.edu
- Software Tools Group, NCSA, University of Illinois at Urbana-Champaign
-
-
-
- ---------------------------
-
- From: fsmcs1@acad3.alaska.edu
- Subject: Help with Think Pascal for a beginner?
- Date: 27 Feb 92 09:40:39 GMT
- Organization: University of Alaska Fairbanks
-
-
-
-
- Okay, okay, okay... I know what you are all going to say.
- 'Get Inside Mac!' Okay. I'm working on it. But since I can't
- access any of the ftp sites (due to the fact I'm on a dumb terminal),
- I'd appreciate it if one of you programming moguls would spare the
- time to give me some hints.
- I'm not new to programming... simply new to programming on
- the Mac. I'm using a copy of Think Pascal (I have Think C, as well,
- but for my purposes, I prefer Pascal), and would like very much to
- know how to open windows, draw icons, and use the pull-down menus to
- affect commands. I'm a quick learner... but I can't learn it without
- an example. If someone could either write me a letter briefly describing
- the commands/prodecures/function calls required, or send me a copy of
- some insignificant source code that contains them, I'd truly appreciate
- it. Like I said, I'm working on getting a copy of IM... but it'll
- take me some time, and I'd rather get started now... thanks for the
- information...
-
-
-
- - -------------------------
-
- From: rfischer@Xenon.Stanford.EDU (Ray Fischer)
- Subject: Help with Think Pascal for a beginner?
- Date: 27 Feb 92 19:58:00 GMT
- Organization: Computer Science Department, Stanford University.
-
- fsmcs1@acad3.alaska.edu writes ...
- > I'm not new to programming... simply new to programming on
- >the Mac. I'm using a copy of Think Pascal (I have Think C, as well,
- >but for my purposes, I prefer Pascal), and would like very much to
- >know how to open windows, draw icons, and use the pull-down menus to
- >affect commands.
-
- If you buy Think C or Think Pascal you get lots of good examples
- for doing just this sort of thing (you did _buy_ your copies, didn't
- you?). In addition to the sample code, there is also the class
- library and ANSI libraries, thousands of lines of source code in all.
-
- Inside Mac (which is sold in computer-related bookstores) is thousands
- of pages long. I doubt many people are willing to summarize for you
- when Inside Mac volume I (which covers the starting basics of
- windows, menus, and events) can be had for < $30 (published by
- Addison-Wesley, as is most of Apple's documentation).
-
- SpinsideMac is the hypercard version and is available via ftp from
- Apple and probably several user groups such as BMUG. Symantec also
- sells Think Reference (I think that's what it is called) which
- summarizes Inside Mac online in a much nicer package than Spinside Mac.
-
- Ray
- rfischer@cs.stanford.edu
-
-
-
- - -------------------------
-
- From: d88-jwa@byse.nada.kth.se (Jon W{tte)
- Subject: Help with Think Pascal for a beginner?
- Date: 27 Feb 92 21:22:27 GMT
- Organization: Royal Institute of Technology, Stockholm, Sweden
-
- .alaska.edu> fsmcs1@acad3.alaska.edu writes:
-
- I'm not new to programming... simply new to programming on
- the Mac. I'm using a copy of Think Pascal (I have Think C, as well,
- but for my purposes, I prefer Pascal), and would like very much to
- know how to open windows, draw icons, and use the pull-down menus to
- affect commands. I'm a quick learner... but I can't learn it without
- an example. If someone could either write me a letter briefly describing
-
- Wrong. You cannot learn without Inside Mac.
-
- What's wrong with all the sample source that comes with Think Pascal
- and Think C ? From what I remember, they come with everything from
- "Hello, World !" to a full-fledged paint program written in the
- supplied object library. You still won't get far without Inside Mac.
- On paper.
-
- There's also the Think Reference at $XX which contains most of IM I-V,
- and has hypertext links.
-
- --
- This Signature is distributed under the conditions of the Signature License,
- available at a fee from h+@nada.kth.se (Jon W{tte) Reading the Signature
- implies that you accept to be bound by the terms in said License. Should you
- not agree on any of these terms, you must return the Signature unread to me.
-
-
-
- - -------------------------
-
- From: stewartj@cae.wisc.edu (Stewart John)
- Subject: Help with Think Pascal for a beginner?
- Date: 28 Feb 92 04:22:14 GMT
- Organization: College of Engineering, Univ. of Wisconsin-Madison
-
- >
- > I'm not new to programming... simply new to programming on
- > the Mac. I'm using a copy of Think Pascal (I have Think C, as well,
- > but for my purposes, I prefer Pascal), and would like very much to
- > know how to open windows, draw icons, and use the pull-down menus to
- > affect commands. I'm a quick learner... but I can't learn it without
- > an example. If someone could either write me a letter briefly describing
- >
-
- Get "Macintosh Pascal Programming Primer: Inside the Macintosh Using THINK Pascal."
- By Dave Mark and Cartwright Reed. Published by Addison-Wesley.
-
- The single most helpful and valuable book I've ever seen to learning to
- program on the Mac. They take you step-by-step on how to use various features
- of the Toolbox.
-
- John
- stewartj@cae.wisc.edu
-
-
-
- ---------------------------
-
- From: tange@daimi.aau.dk (Ole Tange)
- Subject: Help Me Write The Perfect Editor
- Date: 27 Feb 92 04:56:43 GMT
- Organization: DAIMI: Computer Science Department, Aarhus University, Denmark
-
- Since I sold my Amiga I havent seen a decent editor. On my Amiga I had
- Cygnus ED which I used all the time. But now when I am sitting at my IBM-clone
- I miss my CED.
-
- At the university I use UNIX-machines and their editor is EMACS. As far as I
- know this editor is the most powerfull editor ever! BUT it is VERY user
- unfriendly! It has no menus and the help function is very cryptic, too - that
- is, when you are a EMACS-beginner like me.
-
- So...
-
- I decided to start a project called The Perfect Editor.
-
- I want to make the best editor EVER! But I dont think I can do that on my own
- (I am still a novice programmer). So if you want to help me develop a public
- domain editor that is better that the commercial editors please mail me.
-
- I got this idea because I saw FractInt and PV-Ray for my PC and these programs
- are so great that it seems impossible that they are public domain (but they
- ARE!).
-
- If you want to join please mail me!
-
- If you know a newsgroup where this note would be relevant (and you dont find
- it there) please re-post this article.
-
- All my next postings (concerning PED) will go to: comp.editors
-
-
- !Ole Tange
-
-
-
-
-
-
-
-
-
- --
- .:.=========================================================.:.
- .:::::. ANTE TEMPORE - ][T WAS .:::::.
- .:::::::::.Ole Tange, Noerre Alle 66B 3.3, DK-8000 AArhus C.:::::::::.
- .::Have Fun!::. INTERNET: tange@daimi.aau.dk .:::See Ya!:::.
-
-
-
- - -------------------------
-
- From: bskendig@tan.Princeton.EDU (Brian Kendig)
- Subject: Help Me Write The Perfect Editor
- Date: 27 Feb 92 15:29:54 GMT
- Organization: Starfleet Academy, Princeton University
-
- In article <1992Feb27.045643.7980@daimi.aau.dk> tange@daimi.aau.dk (Ole Tange) writes:
- >At the university I use UNIX-machines and their editor is EMACS. As far as I
- >know this editor is the most powerfull editor ever! BUT it is VERY user
- >unfriendly! It has no menus and the help function is very cryptic, too - that
- >is, when you are a EMACS-beginner like me.
- >So...
- >I decided to start a project called The Perfect Editor.
- >I want to make the best editor EVER!
-
- Sorry, somebody beat you to it! ;) It sounds like you're interested
- in writing a version of Emacs with menus and a help function for the
- Mac; the shareware program "Alpha" is exactly this. You can get it
- from sumex-aim.stanford.edu and other fine ftp sites.
-
- Now, if you manage to write the perfect _word processor_ instead of
- just a text editor, mankind just might beat a path to your door...
-
- << Brian >>
-
- --
- | Brian S. Kendig --/\-- Tri bskendig@phoenix.Princeton.EDU, @PUCC
- | Computer Science BSE |/ \| Quad You gave your life to become the person
- | Princeton University /____\ clubs you are right now. Was it worth it?
-
-
-
- ---------------------------
-
- From: long@mcntsh.enet.dec.com (Rich Long)
- Subject: MPW questions
- Date: 27 Feb 92 16:04:00 GMT
- Organization: Digital Equipment Corporation
-
-
- I'm new to MPW (3.2), so I'd appreciate some help with some weird things I
- can't figure out.
-
- 1. How do I tell the Find command to look for a tab character?
-
- 2. I have an Apple RGB monitor and a Radius TPD, to the right of it. The menu
- bar is on the Apple; how can I force MPW to tile windows on the Radius? I've
- played with the -r option on TileWindows and can't get it to work. MPW keeps
- telling me "the specified rectangle is not allowed." It uses global
- coordinates, right?
-
- 3. What would be the script syntax for walking a directory and extracting the
- file name portion of the path? For example, if I have a
- "RCL:this:that:something else" path, and want the "something else" name into
- a variable, how could I do this?
-
- Thank you!!
-
- Richard C. Long long@mcntsh.enet.dec.com
- -or- ...!decwrl!mcntsh.enet.dec.com!long
- -or- long%mcntsh.dec@decwrl.enet.dec.com
-
-
-
- - -------------------------
-
- From: mlanett@void.ncsa.uiuc.edu (Mark Lanett)
- Subject: MPW questions
- Date: 27 Feb 92 17:52:43 GMT
- Organization: University of Illinois at Urbana
-
- long@mcntsh.enet.dec.com (Rich Long) writes:
-
- > I'm new to MPW (3.2), so I'd appreciate some help with some weird things I
- > can't figure out.
-
- > 1. How do I tell the Find command to look for a tab character?
-
- >From the shell: search /6t/ <filenames>, where 6 is option-d (delta).
-
- > 2. I have an Apple RGB monitor and a Radius TPD, to the right of it. The menu
- > bar is on the Apple; how can I force MPW to tile windows on the Radius? I've
- > played with the -r option on TileWindows and can't get it to work. MPW keeps
- > telling me "the specified rectangle is not allowed." It uses global
- > coordinates, right?
-
- Beats me. I use SetKey to assign commands to my function keys to move
- the windows arround. For example:
-
- SetKey F12 'MoveWindow 1049 -18 "{Active}"; SizeWindow 512 745 "{Active}"'
-
- > 3. What would be the script syntax for walking a directory and extracting the
- > file name portion of the path? For example, if I have a
- > "RCL:this:that:something else" path, and want the "something else" name into
- > a variable, how could I do this?
-
- I was going to post some of my code but it's not actually what you want, so
- I'll post some of Apple's instead (from Scripts:MergeBranch)
-
- If "{f}" =~ /(*)R1:(*)R2/ # {f} is the filename
- Set dir "{R1}:"
- Set f "{R2}"
- Else
- Set dir `directory`
- If "{dir}" =~ /(*)R1:/
- Set dir "{R1}:"
- End
- End
-
- Where the R in R1 and R2 is really option-r, and * is really option-x.
- --
- Mark Lanett mlanett@uiuc.edu
- Software Tools Group, NCSA, University of Illinois at Urbana-Champaign
-
-
-
- - -------------------------
-
- From: CXT105@psuvm.psu.edu (Christopher Tate)
- Subject: MPW questions
- Date: 27 Feb 92 20:35:09 GMT
- Organization: Penn State University
-
- In a completely trivial vein....
-
- In article <1992Feb27.175243.8580@ux1.cso.uiuc.edu>, mlanett@void.ncsa.uiuc.edu
- (Mark Lanett) says:
- >
- > [searching for a tab character]
- >
- >From the shell: search /6t/ <filenames>, where 6 is option-d (delta).
-
- Isn't that silly thing a "del" (partial derivative symbol), not a
- "for-real" lower-case delta? I get confuzzed about these things
- as my caffeine:sleep ratio rises....
-
- - -----
- Christopher Tate | Cryptogram #17:
- cxt105@psuvm.psu.edu |
- CXT105@PSUVM.BITNET | "NYO XFJ BCFGJ ZFJN MQWJVU EGYZ XQWBSGCJ. QYT
- - -------------------| ZOXQ HFMWCJXC NYO QFDC, EYG WJUMFJXC."
- Send me the answer! | -- EGFJABWJ H. PYJCU
-
-
-
- - -------------------------
-
- From: mlanett@void.ncsa.uiuc.edu (Mark Lanett)
- Subject: MPW questions
- Organization: University of Illinois at Urbana
- Date: Thu, 27 Feb 1992 22:01:56 GMT
-
- Christopher Tate <CXT105@psuvm.psu.edu> writes:
-
- >In a completely trivial vein....
-
- >In article <1992Feb27.175243.8580@ux1.cso.uiuc.edu>, mlanett@void.ncsa.uiuc.edu
- >(Mark Lanett) says:
- >>
- >> [searching for a tab character]
- >>
- >>From the shell: search /6t/ <filenames>, where 6 is option-d (delta).
-
- >Isn't that silly thing a "del" (partial derivative symbol), not a
- >"for-real" lower-case delta? I get confuzzed about these things
- >as my caffeine:sleep ratio rises....
-
- Whatever. If you want to avoid Apple-isms I suppose you would call it "the
- escape character" rather than by its greek name. What I want to know is,
- what do you call the option-x character? I just say "splat"; most people
- know what I mean. "Variable pattern matcher" seems excessive.
- >-------
- >Christopher Tate | Cryptogram #17:
- >cxt105@psuvm.psu.edu |
- >CXT105@PSUVM.BITNET | "NYO XFJ BCFGJ ZFJN MQWJVU EGYZ XQWBSGCJ. QYT
- >---------------------| ZOXQ HFMWCJXC NYO QFDC, EYG WJUMFJXC."
- >Send me the answer! | -- EGFJABWJ H. PYJCU
- --
- Mark Lanett mlanett@uiuc.edu
- Software Tools Group, NCSA, University of Illinois at Urbana-Champaign
-
-
-
- - -------------------------
-
- From: anders@verity.com (Anders Wallgren)
- Subject: MPW questions
- Organization: Verity, Inc., Mountain View, CA
- Date: Thu, 27 Feb 92 21:24:00 GMT
-
- In article <33784@nntpd.lkg.dec.com>, long@mcntsh (Rich Long) writes:
- >
- > I'm new to MPW (3.2), so I'd appreciate some help with some weird things I
- > can't figure out.
- >
- > 1. How do I tell the Find command to look for a tab character?
-
-
- find /<opt-d>t/ "the window" # <opt-d> means press option-d
-
- >
- > 3. What would be the script syntax for walking a directory and extracting the
- > file name portion of the path? For example, if I have a
- > "RCL:this:that:something else" path, and want the "something else" name into
- > a variable, how could I do this?
- >
-
- if "foo:bar:something else" =~ /[a-zA-Z:_0-9]<opt-x>:([a-zA-Z_0-9]<opt-x>)<opt-r>1/
- set variable "{<opt-r>1}"
- end
-
-
-
-
- - -------------------------
-
- From: tjc@pacvax.pacersoft.com (Tom Colley)
- Subject: MPW questions
- Date: 28 Feb 92 14:49:24 GMT
- Organization: Pacer Software, Inc.
-
- In article <33784@nntpd.lkg.dec.com>, long@mcntsh.enet.dec.com (Rich Long) writes:
- > I'm new to MPW (3.2), so I'd appreciate some help with some weird things I
- > can't figure out.
- >
- > 1. How do I tell the Find command to look for a tab character?
- >
- > 2. ...
- >
- > 3. What would be the script syntax for walking a directory and extracting the
- > file name portion of the path? For example, if I have a
- > "RCL:this:that:something else" path, and want the "something else" name into
- > a variable, how could I do this?
- >
- > Thank you!!
- >
- > Richard C. Long long@mcntsh.enet.dec.com
-
- 1. Copy a tab into the clipboard (from a document). Select Find... Then
- Paste the tab into the text field. Or, you could highlight (select) a
- tab, and then hit Cmd-H (It's under the Find menu).
-
- 2. deferred
-
- 3. I think the evaluate line below is right from the MPW docs. Put your
- path in the variable "fullpath". Change the "R" to an option-r.
- Change the "X" to an option-x. Change the "L" to an option-l (that
- is a lowercase "L", not a "1"). {dir_path} will contain the directory
- that the file is in, {leaf_name} will contain the leaf name.
-
- Unset R1
- ( Evaluate "{fullpath}" =~ /(([L:]*:)*)R1X/ ) > Dev:Null
- Set dir_path "{R1}"
- echo {dir_path}
-
- Unset R1
- ( Evaluate "{fullpath}" =~ /(([L:]*:)*)(X)R1/ ) > Dev:Null
- Set leaf_name "{R1}"
- echo {leaf_name}
-
- Hope this helps.
-
- Tom Colley
- tjc@pacersoft.com uunet!pacvax!tjc
-
-
-
- - -------------------------
-
- From: keith@Apple.COM (Keith Rollin)
- Subject: MPW questions
- Date: 28 Feb 92 23:42:08 GMT
- Organization: Apple Computer Inc., Cupertino, CA
-
- In article <33784@nntpd.lkg.dec.com> long@mcntsh.enet.dec.com (Rich Long) writes:
- >
- > 2. I have an Apple RGB monitor and a Radius TPD, to the right of it. The menu
- > bar is on the Apple; how can I force MPW to tile windows on the Radius? I've
- > played with the -r option on TileWindows and can't get it to work. MPW keeps
- > telling me "the specified rectangle is not allowed." It uses global
- > coordinates, right?
-
-
- Other people have answered the other two questions; I'll see if I can't
- tackle this one. Warning: this is based on memory; I'm not in a
- position to test out what follows.
-
- First, keep in mind that the rectangle you specify applies to the
- structure rectangle of the window. This is in contrast to Window
- Manager routines like MoveWindow, which apply to the content rectangle.
- (Actually, I just tried this out, and it seems to be true only of MPW's
- MoveWindow command. SizeWindow seems to apply to the content rectangle
- of the window, less the info bar and scrollbars.)
-
- Second, MPW considers {0, 0} to be the point just below them menubar on
- the left hand side of the main monitor. This means that the top left
- corner of your monitor is {-20, 0}, according to MPW.
-
- Finally, MPW doesn't seem to like your specifying screen rectangles
- that fall outside of the gray region. For instance, the dimensions of
- my 2-page display are 870 x 1152. However, I can't specify that as the
- rectangle for TileWindows or ZoomWindow, as that rectangle falls into
- the little rounded corners of my screen. I have to account for that by
- subtracting a little bit from the dimensions of the screen. For tiling,
- I think I specify a rectangle of top=1, left=2, bottom=828, right=1149.
-
- --
- - ----------------------------------------------------------------------------
- Keith Rollin --- <Taligent .signature under construction>
- Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
-
-
-
- ---------------------------
-
- From: hofmann@cs.uiuc.edu (J. Scott Hofmann)
- Subject: Passing args to argc, argv[], and env[]
- Organization: University of Illinois at Urbana
- Date: Thu, 27 Feb 1992 16:05:12 GMT
-
- Sorry if I'm missing something extremely obvious, but under the Mac Finder,
- how can arguments be passed to a program via argc, argv[], and env[]? I'm
- doing a port of some Unix software to the Mac Finder and I need it to take
- what were command line arguments from an opening dialogue.
-
- Scott
-
-
- --
- - -----------------------------------------------------------------------------
- J. Scott Hofmann | "Scientific Progress goes 'Boink'?"
- hofmann@cs.uiuc.edu (NeXTmail accepted) | -Hobbes
- Calculus&Mathematica project | Epoch development team, UIUC
-
-
-
- - -------------------------
-
- From: aland@chaos.cs.brandeis.edu (Alan D.)
- Subject: Passing args to argc, argv[], and env[]
- Organization: As little as possible
- Date: Fri, 28 Feb 1992 00:02:46 GMT
-
- hofmann@cs.uiuc.edu (J. Scott Hofmann) writes:
-
- > Sorry if I'm missing something extremely obvious, but under the Mac Finder,
- >how can arguments be passed to a program via argc, argv[], and env[]? I'm
- >doing a port of some Unix software to the Mac Finder and I need it to take
- >what were command line arguments from an opening dialogue.
-
- Well, the 'extremely obvious' thing you are missing is the
- specification of which Mac environment you are using.
-
- If you're using Think C, you should check the User Manual for
- "ccommand()" (I don't remember exactly what parameters, if any, it
- takes -- But probably int argc, char **argv).
-
- If you use MPW, you're on your own, as I've never seen a MPW manual.
- But from what I have seen, "commando" works similarly to the Unix
- shell. As I said, you're on your own for a library function.
-
- If need be, make up your own dialog box, with radio buttons for File,
- Console input, and File, Console, Both output... As Symantec did for
- Think C...
-
- Or make the first dialog of the program be a dialog which reads a
- textedit string; have the user type the parameters. You can even
- store a default value for this string.
-
- Good luck!
-
- -=Alan
-
-
-
- ---------------------------
-
- From: urritche@queen.mcs.drexel.edu (Ralph Paul Ritchey)
- Subject: MIDI source code and programming
- Date: 27 Feb 92 20:24:10 GMT
- Organization: Drexel University
-
- I am currently looking for good public domain MIDI software, source code, and
- anyone else that is into programming MIDI applications on the Mac. If anyone
- knows where I might be able to find things pertaining to this, or if anyone
- is interested in swapping ideas etc., please e-mail me.
-
-
- Ralph Ritchey
- urritche@mcs.drexel.edu
-
-
-
- - -------------------------
-
- From: Saeedi@cup.portal.com (Steven J Saeedi)
- Subject: MIDI source code and programming
- Date: 28 Feb 92 01:13:21 GMT
- Organization: The Portal System (TM)
-
- >I am currently looking for good public domain MIDI software, source code, and
- >anyone else that is into programming MIDI applications on the Mac. If anyone
- >knows where I might be able to find things pertaining to this, or if anyone
- >is interested in swapping ideas etc., please e-mail me.
-
- How does $35 sound? Get the MIDI Manager from APDA and it includes
- all kinds of sample files on sequencing, etc.
-
- -- Steve Saeedi
- >
- >
- > Ralph Ritchey
- > urritche@mcs.drexel.edu
-
-
-
- ---------------------------
-
- From: Joe.Francis@dartmouth.edu (Joe Francis)
- Subject: _Launch & Working Directories
- Date: 27 Feb 92 23:36:30 GMT
- Organization: Dartmouth College, Hanover, NH
-
- Context: systems 6.0.x, MultiFinder running
-
- Question: TN 126 says set WDProcID to 'ERIK' when opening a wd prior
- to _Launch. TN 190 says MultiFinder ignores WDProcID. Who's right?
-
- Note: I get very strange behavoir if I just OpenWD, _Launch, and
- CloseWD. Namely, it becomes possible for HGetVol to return a wd that
- GetWDInfo won't acknowledge as legitimate (this happens to me in the
- HOpenresFile glue, of all places). I think there is some confusion as
- to what process owns the wd at this point. Not calling CloseWD
- alleviates the problem.
-
- Should I abandon OpenWD, use PBOpenWD and set the WDProcID to 'ERIK'?
- If so, do I call CloseWD after _Launch?
-
-
-
- - -------------------------
-
- From: keith@Apple.COM (Keith Rollin)
- Subject: _Launch & Working Directories
- Date: 28 Feb 92 23:50:49 GMT
- Organization: Apple Computer Inc., Cupertino, CA
-
- In article <1992Feb27.233630.6515@dartvax.dartmouth.edu> Joe.Francis@dartmouth.edu (Joe Francis) writes:
- >Context: systems 6.0.x, MultiFinder running
- >
- >Question: TN 126 says set WDProcID to 'ERIK' when opening a wd prior
- >to _Launch. TN 190 says MultiFinder ignores WDProcID. Who's right?
- >
- >Note: I get very strange behavoir if I just OpenWD, _Launch, and
- >CloseWD. Namely, it becomes possible for HGetVol to return a wd that
- >GetWDInfo won't acknowledge as legitimate (this happens to me in the
- >HOpenresFile glue, of all places). I think there is some confusion as
- >to what process owns the wd at this point. Not calling CloseWD
- >alleviates the problem.
- >
- >Should I abandon OpenWD, use PBOpenWD and set the WDProcID to 'ERIK'?
- >If so, do I call CloseWD after _Launch?
-
- DO: Use 'ERIK' for the procID of the wd. This is a special case to the
- paragraph in TN #190 that says MultiFinder ignores it.
-
- DO NOT: Close the wd after you have launched the application. If you
- do, then the just launched application no longer has a wd to work with
- when it might expect one.
-
- DO: Use the System 7 interface for launching application when it is
- available. This avoids the hassles that you are experiencing.
-
- --
- - ----------------------------------------------------------------------------
- Keith Rollin --- <Taligent .signature under construction>
- Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
-
-
-
- ---------------------------
-
- From: mgraf@sydvm1.VNET.IBM.COM (Michael Graf)
- Subject: ListBox problems in Modal Dialog (II)
- Date: 28 Feb 92 15:24:32 GMT
- Organization: Australian Programming Centre (IBMA)
-
-
- I am starting to play around with placing a List Box within a
- Modal Dialog, using the Toolbox List Manager. Following the advice of those
- few individuals who sent me code and samples, I have done what I think is
- the right approach and have almost gotten it to work (thanx again to
- those who helped/advised).
-
- However, I am having some annoying problems, which I assume must have
- arisen for others before, and so I thought I'd ask the net's opinion.
- Firstly, I am using Think Pascal 4.01 and have followed the following
- code steps:
-
- 1. Defined user item in resource template
- 2. For modal dialog, got item Rect for user item, set it appropriately
- and called LNew, with both horizontal and vertical scroll bars
- 3. Drawn rectangle to make up 'list' appearance
- 4. Add 1 single column, with 5 rows to List
- 5. Used LSetCell to add strings to each of the five rows
- 6. Called LDoDraw before (and tried with after) showing the dialog
-
- The following problems arise:
- - on displaying the dialog, none of my string entries are shown.
- If I scroll horizontally and then back, the strings are displayed.
- Do I need to specify some other 'update activity' apart from the
- LDoDraw ?
-
- - the strings, when displayed are not shown correctly; they each
- have an extra byte (the standard 'box' character). I have used the
- following to set the text string (PTR) for LSetCell:
- VAR
- aTextPtr: Ptr;
- :::
- aTextPtr := NewPtr(length_of_theString);
- aTextPtr := @theString;
- What is causing this EXTRA byte to appear in the string ? Using the
- THINK step debugger, I can show that @theString matches the address
- set to aTextPtr, and that aTextPtr^ has the correct data.
-
- - lastly, on quitting my program, THINK returns the following
- error:
- 'System Zone is damaged. Proceed with caution.'
- What could possibly cause this ?
-
- Can anyone shed any light on the above situations ? I would greatly
- appreciate any words of wisdom, especially those which might enlighted
- me on what Pascal blunders I have committed.
-
- Thanx, in advance, for the help.
-
- **********************************************************************
- Regards,
- Michael Graf - humble novice programmer (mgraf@sydvm1.vnet.ibm.com)
- **********************************************************************
-
-
-
- - -------------------------
-
- From: mxmora@unix.SRI.COM (Matt Mora)
- Subject: ListBox problems in Modal Dialog (II)
- Date: 28 Feb 92 18:11:42 GMT
- Organization: SRI International, Menlo Park, California
-
- In article <9202280026.AA27190@ucbvax.Berkeley.EDU> mgraf@sydvm1.VNET.IBM.COM (Michael Graf) writes:
-
- > The following problems arise:
- > - on displaying the dialog, none of my string entries are shown.
- > If I scroll horizontally and then back, the strings are displayed.
- > Do I need to specify some other 'update activity' apart from the
- > LDoDraw ?
-
- in your filterproc don't forget to add LUpdate(redraw, list);
-
- > - the strings, when displayed are not shown correctly; they each
- > have an extra byte (the standard 'box' character). I have used the
- > following to set the text string (PTR) for LSetCell:
- > VAR
- > aTextPtr: Ptr;
- > :::
- > aTextPtr := NewPtr(length_of_theString);
- > aTextPtr := @theString;
-
- All that code is too much work. (plus you are creating a new ptr
- for no reason)
-
- Try:
-
- LSetCell(ptr(ord(@theString)+1), length(theString),theCell,mylist);
-
- You are adding the length byte in the cell. In the above code we skip the
- length byte and just add the string.
-
- >
- > - lastly, on quitting my program, THINK returns the following
- > error:
- > 'System Zone is damaged. Proceed with caution.'
- > What could possibly cause this ?
-
- This usally happens if you are using a bad handle (or ptr) and you
- are trashing memory somewhere. A common problem with using the list
- manager (since it return no errors) is that you are stuffing too
- much data in to the list. (not likely in you case since you only have
- five rows). Remember not to stuff more than 32k of data into the list.
-
-
- That should do it.
-
- Good Luck
-
-
- Matt
- --
- ___________________________________________________________
- Matthew Mora | my Mac Matt_Mora@sri.com
- SRI International | my unix mxmora@unix.sri.com
- ___________________________________________________________
-
-
-
- ---------------------------
-
- End of C.S.M.P. Digest
- **********************
-